<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站管理后台</title>
<link rel="stylesheet" href="__PUBLIC__/style/style.css" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/Js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/jquery.validate.js"></script>
</head>
<body>
<div id="wrap">
  <div id="header">
    <div id="logo"></div>
    <div id="user"><a href="">注册</a><span>|</span><a href="">登录</a></div>
    <div id="nav">
      <ul>
        <li class="nobg"><a href="<?php echo U('admin/index');?>">首页</a></li>
		<li><a href="<?php echo U('admin/user');?>">用户管理</a></li>
      </ul>
    </div>
  </div>
<div id="mainWrap">
  <div id="main">
    <div class="blank15"></div>
    <div class="blank5"></div>
    <div id="position">当前位置:用户管理</div>
    <ul class="clearfix mb10" id="subNav">
      <li><a href="<?php echo U('user/index');?>">用户资料管理</a> -- <a href="<?php echo U('user/add');?>">添加用户</a></li>
      <li><a href="<?php echo U('role/index');?>">用户组管理</a> -- <a href="<?php echo U('role/add');?>">添加用户组</a></li>
      <li><a href="<?php echo U('node/index');?>">权限节点管理</a> -- <a href="<?php echo U('node/add');?>">添加权限节点</a></li>
    </ul>
    <div id="searchArea">
	  <script>
$(document).ready(function(){    
 $.validator.addMethod("stringCheck", function(value, element) {       
     return this.optional(element) || /^[_A-Za-z0-9]+$/.test(value);       
 }, "英文字母、数字和下划线");    
});
 		</script>
      <form method="post" action="<?php if(ACTION_NAME=='add'): echo U('User/insert'); else: echo U('User/update'); endif; ?>" id="myform">
        <table width="100%" cellspacing="10" cellpadding="0">
          <tbody>
            <tr>
              <td width="115" align="right"></td>
              <td align="left"></td>
            </tr>
            <tr>
              <td width="115" align="right"> 账号: </td>
              <td>
			 <?php if(ACTION_NAME=='add'): ?><input type="text" style="width:185px;"  size="25" validate="{required:true,stringCheck:true,rangelength:[5,15],remote:'<?php echo U('public/checkname'); ?>',messages:{remote:'用户名字已存在！'}}" class="intxt" id="username" name="username" value="<?php echo ($vo["username"]); ?>"><font color="#ff0000">*</font><?php else: echo ($vo["username"]); endif; ?>
                </td>
            </tr>
            <tr>
              <td align="right"> 密码: </td>
              <td><input type="password" value="" validate="{<?php if(ACTION_NAME=='add'): ?>required:true,<?php endif; ?>minlength:6}" size="25" class="intxt" id="password" name="password">
                <font color="#ff0000">*</font></td>
            </tr>
            <tr>
              <td align="right"> 确认密码: </td>
              <td><input type="password" size="25" validate="{<?php if(ACTION_NAME=='add'): ?>required:true,<?php endif; ?>equalTo:'#password'}" class="intxt" id="repassword" name="repassword">
                <font color="#ff0000">*</font></td>
            </tr>
            <tr>
              <td align="right"> 真实姓名: </td>
              <td><input type="text" validate="{required:true}" style="width:185px;" class="intxt" id="nickname" name="nickname" value="<?php echo ($vo['nickname']); ?>">
                <font color="#ff0000">*</font></td>
            </tr>
			<tr>
              <td align="right"> 邮箱: </td>
              <td><input type="text" style="width:185px;" validate="{required:true,email:true<?php if(ACTION_NAME=='add'): ?>,remote:'<?php echo U('public/checkemail'); ?>',messages:{remote:'邮箱已存在！'}<?php endif; ?>}" class="intxt" id="email" name="email" value="<?php echo ($vo["email"]); ?>"> <font color="#ff0000">*</font></td>
            </tr>
			<tr><td align="right">是否激活:</td><td>是 <input type="radio" value="1" name="status" <?php if(empty($$vo['status'])): ?>checked="checked"<?php else: ?> <?php if($vo['status'] == 1): ?>checked="checked"<?php endif; endif; ?>> 否 <input type="radio" value="0" name="status" <?php if(!empty($$vo['status'])): if($vo['status'] == 0): ?>checked="checked"<?php endif; endif; ?>></td></tr>
            <tr>
              <td align="right"> QQ: </td>
              <td><input type="text" style="width:185px;"  size="25" class="intxt" id="qq" name="qq" value="<?php echo ($vo["qq"]); ?>" ></td>
            </tr>
            
            <tr>
              <td></td>
              <td><input type="submit" class="btn_tijiao" value=""></td>
            </tr>
          </tbody>
        </table>
      </form>
    </div>
  </div>
  <div id="mainBot"></div>
</div>
</div>
</body>
</html>